
/* =========================================================
   Whole Blog Layout
========================================================= */

.each-blog-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
    margin: 30px 0;
    align-items: start;
}


/* =========================================================
   Main Content
========================================================= */

.each-blog-layout .each-right {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;

    padding: 20px;
    background-color: var(--secondary);
    border-radius: 8px;

    display: flex;
    flex-direction: column;

    /* کمی کمتر از مقدار اولیه */
    row-gap: 12px;

    border: 1px solid var(--grey220);
}


/* متن‌ها */

.each-blog-layout .each-right p {
    max-width: 100%;

    text-align: justify;

    overflow-wrap: break-word;
    word-wrap: break-word;
}


/* Short Description */

.each-blog-layout .each-right .psize {
    width: 100%;
    max-width: 100%;

    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;

    text-align: justify;
}


/* لیست‌ها */

.each-blog-layout .each-right ul {
    list-style-position: inside;

    text-align: justify;

    overflow-wrap: break-word;
}


/* =========================================================
   Main Blog Image
========================================================= */

.each-blog-layout .each-right > img {
    width: 100%;
    max-width: 100%;

    max-height: 500px;

    object-fit: cover;

    display: block;

    border-radius: 8px;
}


/* =========================================================
   Content Images
========================================================= */

.each-blog-layout .each-right .blog-content img {
    width: auto;
    max-width: 100%;
    max-height: 350px;

    object-fit: contain;

    display: block;

    margin: 8px auto;

    border-radius: 8px;
}


/* =========================================================
   Blog Title
========================================================= */

.each-blog-layout .each-right h1 {
    text-align: center;

    margin-top: 8px;

    color: var(--primary);
}


/* =========================================================
   Blog Meta
========================================================= */

.blog-meta {
    display: flex;

    align-items: center;

    padding: 1px 0;

    gap: 15px;

    border-bottom: 1px solid var(--primary);

    flex-wrap: wrap;
}

.blog-meta div {
    display: flex;

    align-items: center;

    gap: 5px;

    font-size: 12px;

    color: var(--primary);
}


/* =========================================================
   Blog Content Blocks
========================================================= */

.each-blog-layout .each-right .blog-content {
    width: 100%;
    max-width: 100%;

    display: flex;
    flex-direction: column;

    /* کمی کمتر از 10px اولیه */
    gap: 0px;
}


/* =========================================================
   Sidebar
========================================================= */

.each-blog-layout .each-left {
    width: 320px;
    max-width: 320px;

    box-sizing: border-box;

    padding: 20px;

    background-color: var(--secondary);

    border: 1px solid var(--grey220);

    border-radius: 8px;

    height: fit-content;

    position: sticky;

    top: 50px;

    align-self: start;
}


/* =========================================================
   Sidebar Title
========================================================= */

.each-blog-layout .each-left .title {
    display: flex;

    justify-content: center;
    align-items: center;

    gap: 5px;

    color: var(--primary);

    font-weight: bold;
}


/* =========================================================
   Newest Blogs
========================================================= */

.main-newest-blog {
    width: 100%;

    display: flex;
    flex-direction: column;

    /* کمی کمتر از 15px اولیه */
    gap: 12px;
}


/* =========================================================
   Newest Blog Item
========================================================= */

.newest-blog-layout {
    display: flex;

    align-items: center;

    gap: 10px;

    width: 100%;
    max-width: 100%;

    /* کمی کمتر از 20px اولیه */
    margin-top: 15px;

    box-sizing: border-box;
}


/* =========================================================
   Newest Blog Image
========================================================= */

.newest-blog-layout .newest-blog-image {
    width: 60px;
    height: 60px;

    flex: 0 0 60px;

    border-radius: 50%;

    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}


/* =========================================================
   Newest Blog Data
========================================================= */

.newest-blog-layout .blog-data {
    min-width: 0;

    flex: 1;

    overflow: hidden;
}

.newest-blog-layout .blog-data p {
    width: 100%;

    margin: 0;

    font-size: 14px;

    line-height: 1.7;

    overflow: hidden;

    display: -webkit-box;

    -webkit-box-orient: vertical;

    -webkit-line-clamp: 2;
}

.newest-blog-layout .blog-data .meta {
    margin-top: 3px;

    font-size: 12px;

    color: var(--primary);

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* =========================================================
   Responsive - Tablet
========================================================= */

@media (max-width: 992px) {

    .breadcrumb-links {
        text-align: center;

        font-size: 12px;
    }

    .each-blog-layout {
        grid-template-columns: 1fr;

        gap: 20px;
    }

    .each-blog-layout .each-right {
        order: 1;
    }

    .each-blog-layout .each-left {
        order: 2;

        width: 100%;
        max-width: 100%;

        margin: 0;

        position: static;
    }
}


/* =========================================================
   Responsive - Mobile
========================================================= */

@media (max-width: 576px) {

    .each-blog-layout {
        margin: 20px 0;
    }

    .each-blog-layout .each-right {
        padding: 15px;
    }

    .each-blog-layout .each-right > img {
        max-height: 300px;
    }

    .blog-meta {
        gap: 10px;
    }

    .newest-blog-layout .newest-blog-image {
        width: 50px;
        height: 50px;

        flex-basis: 50px;
    }

    .newest-blog-layout .blog-data p {
        font-size: 13px;
    }

    .newest-blog-layout .blog-data .meta {
        font-size: 11px;
    }
}